package com.lora.util;

import java.util.HashMap;

public class AirConditioningUpsMapping {
    private static HashMap<Integer,String> map=new HashMap();
    private AirConditioningUpsMapping(){};

    static {
        map.put(135,"refrigerationstate");
        map.put(136,"heatingstate");
        map.put(137,"humidificationstate");
        map.put(138,"fehumidificationstate");
        map.put(160,"airsupplytemperaturefailure");
        map.put(161,"hightemperaturealarm");
        map.put(162,"lowtemperaturealarm");
        map.put(163,"highhumidityalarm");
        map.put(164,"lowhumidityalarm");
        map.put(165,"highvoltagealarm");
        map.put(166,"lowhvoltagelock");
        map.put(169,"lowhvoltagealarm");
        map.put(170,"lowhvoltagelock");
        map.put(171,"lightningprotectionalarm");
        map.put(173,"exhaustalarm");
        map.put(174,"exhaustlock");
        map.put(175,"humidifyingovercurrent");
        map.put(177,"internalfanfault");
        map.put(178,"flooroverflow");
        map.put(179,"airflowloss");
        map.put(181,"humidifierfailure");
        map.put(182,"heaterfailure");
        map.put(184,"returnairtemperaturefault");
        map.put(185,"returnrheumatismfault");
        map.put(188,"condensationpressurefault");
        map.put(190,"smokealarm");
        map.put(191,"missingphasealarm");
        map.put(192,"phasesequenceerror");
        map.put(197,"remoteshutdownalarm");
        map.put(198,"powerlossalarm");
        map.put(199,"networkfailurealarm");
        map.put(31,"returnairtemperaturenumber");
        map.put(32,"returnairtemperaturepercentage");
        map.put(311,"internalfanruntime");
        map.put(312,"externalfanruntime");
        map.put(313,"compressorruntime");
        map.put(316,"electricheatingrruntime");
        map.put(317,"humidifierruntime");
        map.put(318,"powerfrequency");
        map.put(319,"heatingsetting");
        map.put(321,"hightemperaturealarmnumber");
        map.put(322,"lowetmperaturealarmnumber");
        map.put(323,"highhumidityalarmnumber");
        map.put(324,"lowhumidityalarmnumber");
        map.put(327,"refrigerationsettingpoint");
        map.put(330,"humiditysettingpoint");
        map.put(354,"airconditioningrunstate");
    }

    /**
     * 通过地址获取对应的字段
     * @param address
     * @return
     */
    public static String getFiled(String address){
        return map.get(Integer.parseInt(address));
    }
}
